namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update115 : DbMigration
    {
        public override void Up()
        {
            DropTable("dbo.hrm_ps_non_working_days");
            RenameTable(name: "dbo.HrmPsNonWorkingDay", newName: "hrm_ps_non_working_days");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "NonWorkingId", newName: "non_working_seq");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "BgYear", newName: "bg_year");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "NonWorkingDate", newName: "non_working_date");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "NonWorkingName", newName: "non_working_name");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "RecordStatus", newName: "record_status");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "CreatedBy", newName: "created_by");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "CreatedWhen", newName: "created_when");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "UpdatedBy", newName: "updated_by");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "UpdatedWhen", newName: "updated_when");
            AlterColumn("dbo.hrm_ps_non_working_days", "remarks", c => c.String());
        }
        
        public override void Down()
        {
            AlterColumn("dbo.hrm_ps_non_working_days", "Remarks", c => c.String());
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "updated_when", newName: "UpdatedWhen");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "updated_by", newName: "UpdatedBy");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "created_when", newName: "CreatedWhen");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "created_by", newName: "CreatedBy");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "record_status", newName: "RecordStatus");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "non_working_name", newName: "NonWorkingName");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "non_working_date", newName: "NonWorkingDate");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "bg_year", newName: "BgYear");
            RenameColumn(table: "dbo.hrm_ps_non_working_days", name: "non_working_seq", newName: "NonWorkingId");
            RenameTable(name: "dbo.hrm_ps_non_working_days", newName: "HrmPsNonWorkingDay");
        }
    }
}
